﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Kinect_Dance.Screens
{
    class AboutScreen : Microsoft.Xna.Framework.Game
    {
        private static AboutScreen instance = null;

        public static AboutScreen getInstance(MainGame g)
        {
            if (instance == null)
            {
                instance = new AboutScreen(g);
            }
            return instance;
        }

        // Variables

        Texture2D mTextureBackground;
        Texture2D mTextureBack_Normal;
        Texture2D mTextureBack_Selected;
        MouseState currentMouseState;
        SpriteBatch sp;
        bool isOver;
        MainGame mGame;

        public AboutScreen(MainGame g)
        {
            this.mGame = g;
            mTextureBackground = g.Content.Load<Texture2D>("Images/bg_mainmenu");
            mTextureBack_Normal = g.Content.Load<Texture2D>("Images/btn_back_normal");
            mTextureBack_Selected = g.Content.Load<Texture2D>("Images/btn_back_select");
            isOver = false;
        }

        protected override void Initialize()
        {
            base.Initialize();
        }

        protected override void LoadContent()
        {
            base.LoadContent();
        }

        protected override void UnloadContent()
        {
            base.UnloadContent();
        }

        protected override void Draw(GameTime gameTime)
        {
            mGame.GraphicsDevice.Clear(Color.White);
            sp.Begin();

            sp.Draw(mTextureBackground, new Vector2(0, 0), Color.White);
            if (isOver)
            {
                sp.Draw(mTextureBack_Selected, new Vector2(0, 0), Color.White);
            }
            else
            {
                sp.Draw(mTextureBack_Normal, new Vector2(0, 0), Color.White);
            }
            sp.End();

            base.Draw(gameTime);
        }

        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }


        public void gameDraw(GameTime gameTime, SpriteBatch sp)
        {
            this.sp = sp;
            Draw(gameTime);
        }

        public void gameUpdate(GameTime gameTime)
        {
            Update(gameTime);
        }
    }
}
